//
//  StdSet.h
//  CollectionTest
//
//  Created by Dusan Vujosevic on 2013-10-25.
//  Copyright (c) 2013 Suavetech. All rights reserved.
//

#ifndef __CollectionTest__StdSet__
#define __CollectionTest__StdSet__

#include <set>
#include "CollectionBase.h"

typedef std::set<elemType> mySet;
typedef std::set<elemType>::iterator mySetIterator;

class StdSet: public CollectionBase
{
public:
	StdSet(size_t elemCountHint): CollectionBase(elemCountHint) {}
	
	virtual const char* name() const { return "std::set"; }
	
	// Initialization, optional
	virtual bool init();
	
	// Reset, return to intial (clean) state, mandatory
	virtual void reset();

	// Load the collection, mandatory, timed
	virtual void loadElements(const void* randBytes, size_t elemCount);
	
	// Random search, mandatory, timed
	virtual bool findElement(elemType elem);
	
	// Ordered iteration, optional, timed
	virtual bool canIterateOrdered() const { return true; }
	virtual void resetIterateOrdered();
	virtual bool nextIterateOrdered(elemType* elem);

private:
	mySet _set;
	mySetIterator _setIterator;
};

#endif /* defined(__CollectionTest__StdSet__) */
